package com.thghh.ch5.tree;

/**
 * @author Zhikang.Peng
 * @version 1.0
 * @email thghh@qq.com
 * @date 2020/9/10 10:05
 */
public class IntlNode implements BinNode<Character> {

    private BinNode left;
    private BinNode right;
    private Character opx;

    public IntlNode(BinNode left, BinNode right, Character opx) {
        this.left = left;
        this.right = right;
        this.opx = opx;
    }

    public Character element() {
        return opx;
    }

    public Character setElement(Character opx) {
        return this.opx = opx;
    }

    public BinNode left() {
        return left;
    }

    public BinNode setLeft(BinNode left) {
        return left = left;
    }

    public BinNode right() {
        return right;
    }

    public BinNode right(BinNode right) {
        return this.right = right;
    }

    public boolean isLeaf() {
        return false;
    }
}

